package com.zg.scf.domain.convert;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zg.common.core.dao.scf.entity.Credit;
import com.zg.scf.domain.vo.CreditVo;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * <p>Description: </p>
 *
 * @author zhanfeng.liang
 * @since 2025/7/9 18:15
 */
@Mapper(componentModel = "spring")
public interface CreditConvert {

    CreditVo toVo(Credit apiService);



    List<CreditVo> toVoList(List<Credit> users);



    default IPage<CreditVo> toVoPage(Page<Credit> userPage) {
        return userPage.convert(this::toVo);
    }
}
